package com.ruoyi.project.ledger.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.ledger.mapper.LedgerBusinessRegistrationMapper;
import com.ruoyi.project.ledger.domain.LedgerBusinessRegistration;
import com.ruoyi.project.ledger.service.ILedgerBusinessRegistrationService;

/**
 * 进驻经营业户登记台账Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-04-14
 */
@Service
public class LedgerBusinessRegistrationServiceImpl implements ILedgerBusinessRegistrationService 
{
    @Autowired
    private LedgerBusinessRegistrationMapper ledgerBusinessRegistrationMapper;

    /**
     * 查询进驻经营业户登记台账
     * 
     * @param id 进驻经营业户登记台账ID
     * @return 进驻经营业户登记台账
     */
    @Override
    public LedgerBusinessRegistration selectLedgerBusinessRegistrationById(Long id)
    {
        return ledgerBusinessRegistrationMapper.selectLedgerBusinessRegistrationById(id);
    }

    /**
     * 查询进驻经营业户登记台账列表
     * 
     * @param ledgerBusinessRegistration 进驻经营业户登记台账
     * @return 进驻经营业户登记台账
     */
    @Override
    public List<LedgerBusinessRegistration> selectLedgerBusinessRegistrationList(LedgerBusinessRegistration ledgerBusinessRegistration)
    {
        return ledgerBusinessRegistrationMapper.selectLedgerBusinessRegistrationList(ledgerBusinessRegistration);
    }

    /**
     * 新增进驻经营业户登记台账
     * 
     * @param ledgerBusinessRegistration 进驻经营业户登记台账
     * @return 结果
     */
    @Override
    public int insertLedgerBusinessRegistration(LedgerBusinessRegistration ledgerBusinessRegistration)
    {
        ledgerBusinessRegistration.setCreateTime(DateUtils.getNowDate());
        return ledgerBusinessRegistrationMapper.insertLedgerBusinessRegistration(ledgerBusinessRegistration);
    }

    /**
     * 修改进驻经营业户登记台账
     * 
     * @param ledgerBusinessRegistration 进驻经营业户登记台账
     * @return 结果
     */
    @Override
    public int updateLedgerBusinessRegistration(LedgerBusinessRegistration ledgerBusinessRegistration)
    {
        ledgerBusinessRegistration.setUpdateTime(DateUtils.getNowDate());
        return ledgerBusinessRegistrationMapper.updateLedgerBusinessRegistration(ledgerBusinessRegistration);
    }

    /**
     * 批量删除进驻经营业户登记台账
     * 
     * @param ids 需要删除的进驻经营业户登记台账ID
     * @return 结果
     */
    @Override
    public int deleteLedgerBusinessRegistrationByIds(Long[] ids)
    {
        return ledgerBusinessRegistrationMapper.deleteLedgerBusinessRegistrationByIds(ids);
    }

    /**
     * 删除进驻经营业户登记台账信息
     * 
     * @param id 进驻经营业户登记台账ID
     * @return 结果
     */
    @Override
    public int deleteLedgerBusinessRegistrationById(Long id)
    {
        return ledgerBusinessRegistrationMapper.deleteLedgerBusinessRegistrationById(id);
    }
}
